[build] Remove omnisharp.json generation from xaprepare#11631
[build] Remove omnisharp.json generation from xaprepare#11631jonathanpeppers wants to merge 2 commits into
Conversation
The Get_Omnisharp_Json step in Step_GenerateFiles substituted two placeholders into build-tools/scripts/omnisharp.json.in and wrote an omnisharp.json file at the repo root for OmniSharp / VS Code C# extension users. The generated file was always .gitignored and nothing in the repo, build, or CI consumes it -- it was purely a local-dev convenience. Anyone who actually wants an omnisharp.json can keep their own local copy (it remains gitignored). Removing the generation slice is another small step in the slow xaprepare reduction, following the same pattern as PRs #11568, #11580, #11608, and #11613. Audit before / after: ``git grep -in omnisharp`` previously returned five hits and now returns only one -- the unrelated MSBuild context guard in xaprepare.csproj that prevents xaprepare''s targets from importing under OmniSharp''s MSBuild process. That guard is intentional and is left untouched. Changes: - Step_GenerateFiles.cs: drop the Get_Omnisharp_Json (context) entry from the generated-files list and delete the Get_Omnisharp_Json method. - Delete build-tools/scripts/omnisharp.json.in. - Remove /omnisharp.json from .gitignore (the file is no longer produced). The shared properties used by the deleted method (MicrosoftDotnetSdkInternalPackageVersion, DotNetPreviewPath) are still referenced by Step_InstallDotNetPreview and xaprepare.targets, so they remain. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Removes local-developer-only omnisharp.json generation from xaprepare, continuing the ongoing reduction of xaprepare responsibilities in the build tooling.
Changes:
- Removed
Get_Omnisharp_JsonfromStep_GenerateFilesand deleted its implementation. - Deleted the
build-tools/scripts/omnisharp.json.intemplate. - Updated
.gitignoreto stop ignoring/omnisharp.json.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.cs | Removes the omnisharp-generated-file entry and its generator method. |
| build-tools/scripts/omnisharp.json.in | Deletes the unused OmniSharp configuration template. |
| .gitignore | Removes the repo-root omnisharp.json ignore entry. |
| Novell | ||
| *.patch | ||
| *.keystore | ||
| /omnisharp.json |
There was a problem hiding this comment.
Anyone who actually wants an omnisharp.json can keep their own local copy (it remains gitignored).
I suggest keeping this file in .gitignore so we don't accidentally commit it if VS Code or something generates it.
There was a problem hiding this comment.
AI says:
omnisharp.jsonis not generated automatically by the standard .NET SDK or OmniSharp tooling. If a repo needs OmniSharp-specific settings, the file is usually created manually at the workspace/repo root, or configured globally under the user’s OmniSharp config folder. For formatting/analyzer settings,.editorconfigis generally the better repo-wide option unless there’s a specific OmniSharp setting needed.
So, we must have written code to generate it at some point.
Most people probably would just use C# DevKit now anyway, but I guess they could get annoyed if it showed up as changes.
Keep the gitignore entry so contributors can drop their own local omnisharp.json without it showing up in `git status`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Context
Get_Omnisharp_JsoninStep_GenerateFilessubstituted two placeholders intobuild-tools/scripts/omnisharp.json.inand wroteomnisharp.jsonat the repo root for OmniSharp / VS Code C# extension users. The generated file was always.gitignored and nothing in the repo, build, or CI consumes it — it was purely a local-dev convenience.Anyone who actually wants an
omnisharp.jsoncan keep their own local copy (it remains gitignored). Removing this generation slice is another small step in the slow xaprepare reduction, continuing the pattern from #11568, #11580, #11608, and #11613.Audit
Before this change
git grep -in "omnisharp"returned five hits. After it returns only one — the unrelated MSBuild-context guard inxaprepare.csprojthat prevents xaprepare's targets from importing under OmniSharp's MSBuild process:That guard is intentional and is not touched by this PR.
Changes
build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.cs: drop theGet_Omnisharp_Json (context)entry from the generated-files list and delete theGet_Omnisharp_Jsonmethod.build-tools/scripts/omnisharp.json.in./omnisharp.jsonfrom.gitignore— the file is no longer produced.The shared properties used by the deleted method (
MicrosoftDotnetSdkInternalPackageVersion,DotNetPreviewPath) are still referenced byStep_InstallDotNetPreviewandxaprepare.targets, so they remain.Verification
dotnet build build-tools/xaprepare/xaprepare/xaprepare.csproj -c Debug— 0 warnings, 0 errors.git grep -in "omnisharp"— returns only the unrelatedxaprepare.csprojguard described above.Documentation/references to omnisharp; no.vscode/folder in the repo.